import { Controller, Get, Inject, Param, Query } from '@nestjs/common';
import { ClientGrpc } from '@nestjs/microservices';
import { TestService } from '../../test/src/test.service';

@Controller()
export class AppController {
  private service:TestService
  constructor(@Inject("TEST") private readonly client: ClientGrpc) {
    this.service =  this.client.getService("TEST")
  }

  @Get()
  getHello(@Query("qurey") qurey:string): string {

    return this.service.testLink(qurey);
  }
}
